﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "试卷查看";//ViewBag.paperName;
}

<div id="comment-intro" onmouseover="Mouse_in()" onmouseout="Mouse_out()" onclick="switchToPaper()" style="cursor: pointer; position: fixed; width: auto; height: auto; background-color: #f7f7f7; ">
    <div style="width: 200px; height: 50px; background-color: #c1f0c1; text-align: center; ">
        <h3 style="font-family: 微软雅黑; padding-top: 10px; ">试卷评论</h3>
    </div>
    <div id="comment-extend" style="background-color: #f7f7f7; width: 100%; height: auto; ">
        <img style="margin-left: 50px; opacity: 0.3; " src="~/PicRes/assemble-extend.png" />
    </div>
</div>
<div id="comment-content" class="col-md-9" style="display: none; height: auto; background-color: #f7f7f7; padding-left: 0px; padding-right: 0px; padding-bottom: 40px; ">
    <div style="width: 300px; height: 75px; background-color: #c1f0c1; text-align: center; margin-top: 20px; margin-left: 0px; ">
        <h2 style="font-family: 微软雅黑; padding-top: 20px; ">试  卷  评  论</h2>
    </div>
    <div style="margin-top: 40px; ">
        <textarea class=" col-md-offset-2 form-control" rows="3" placeholder="您可以在此处评论本试卷"></textarea>
        @Ajax.ActionLink("发表评论", "Comment", "ViewPaper", null, new AjaxOptions
                {
                    HttpMethod = "Post",
                    InsertionMode = InsertionMode.InsertBefore,
                    UpdateTargetId = "@ID",
                }, new { @class = "button button-flat-primary", style = "margin-top:10px;margin-left:69%;" })
    </div>
    @Html.Partial("_commentPartial")
</div>
<div id="paper-intro" onmouseover="Mouse_in()" onmouseout="Mouse_out()" onclick="switchToComment()" style="cursor: pointer; display: none; position: fixed; right: 15%; width: auto; height: auto; background-color: #f7f7f7; ">
    <div style="width: 200px; height: 50px; background-color: #fccc8a; text-align: center; ">
        <h3 style="font-family: 微软雅黑; padding-top: 10px; ">试卷内容</h3>
    </div>
    <div id="paper-extend" style="background-color: #f7f7f7; width: 100%; height: auto; ">
        <img style="margin-left: 50px; opacity: 0.3; " src="~/PicRes/upload-extend.png" />
    </div>
</div>
<div id="paper-content" class="col-md-offset-3 col-md-9" style=" float: right; height: auto; background-color: #f7f7f7; padding-bottom: 40px; padding-left: 0px; padding-right: 0px;">
    <div style="width: 300px; height: 75px; background-color: #fccc8a; text-align: center; margin-top: 20px; margin-right: 0px; float: right; ">
        <h2 style="font-family: 微软雅黑; ">试  卷  内  容</h2>
    </div>
    @Html.Partial("_paperPartial")
</div>
<script type="text/javascript">
    function switchToComment() {
        $("#comment-content").toggle(400);
        $("#paper-intro").hide();
        $("#comment-intro").show(400);
        $("#paper-content").toggle(400);
    }
    function switchToPaper() {
        $("#paper-content").toggle(400);
        $("#comment-intro").hide();
        $("#paper-intro").show(400);
        $("#comment-content").toggle(400);
    }
    function Mouse_in() {
        $("#comment-extend > img,#paper-extend > img").css("opacity", 1);
    }

    function Mouse_out() {
        $("#comment-extend > img,#paper-extend > img").css("opacity", 0.3);
    }
</script>@*评论与试卷内容之间的切换*@